home *** CD-ROM | disk | FTP | other *** search
/ Geni@l B1 3 / Geni@l B1 3.iso / Mac_OSX / Install Flash Player 10 UB.dmg / Adobe Flash Player.pkg / Contents / Resources / MacOSXVersionCheck.sh < prev    next >
Linux/UNIX/POSIX Shell Script  |  2009-02-05  |  1KB  |  32 lines

  1. #!/bin/sh
  2.  
  3. #
  4. # Copyright 2008 Adobe Systems Incorporated. All Rights Reserved.
  5. #
  6.  
  7. # ------------------------------------------------------------------------------
  8. # [1]    Flash Player 10 requires Mac OS X v10.4 or greater.
  9. #     Ensure that the current system meets that requirement.
  10. # ------------------------------------------------------------------------------
  11. AWKSCRIPT_BASE_PATH=`echo $0 | awk '{gsub("/MacOSXVersionCheck.sh", ""); printf($0);}'`
  12. /usr/bin/sw_vers -productVersion | awk -f "$AWKSCRIPT_BASE_PATH/ICVersionValidator.awk"
  13. EXECUTION_STATUS=$?
  14.  
  15. if [ $EXECUTION_STATUS -eq 0 ]
  16. then
  17.     # Requirement was met: return 0
  18.     exit 0
  19. else
  20.     # Requirement was not met: display dialog & return error to
  21.     # halt the installation.
  22.     
  23.     `osascript<<EOF
  24.         tell application "Installer"
  25.         set response_action to display dialog "Adobe Flash Player 10 requires Mac OS X version 10.4 or later. It cannot be installed on earlier versions of Mac OS X." buttons {"Close"} default button 1 with icon stop
  26.         end tell
  27.         EOF`
  28.     exit 1
  29. fi
  30.  
  31. #end script
  32.